package com.athuahua.spzx.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * @TableName order_info
 */
@TableName(value ="order_info")
@Data
public class OrderInfo implements Serializable {
    private Long id;

    private Long userId;

    private String nickName;

    private String orderNo;

    private Long couponId;

    private BigDecimal totalAmount;

    private BigDecimal couponAmount;

    private BigDecimal originalTotalAmount;

    private BigDecimal feightFee;

    private Integer payType;

    private Integer orderStatus;

    private String receiverName;

    private String receiverPhone;

    private String receiverTagName;

    private Long receiverProvince;

    private Long receiverCity;

    private Long receiverDistrict;

    private String receiverAddress;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date paymentTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deliveryTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date receiveTime;

    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date cancelTime;

    private String cancelReason;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    /**
     * 额外的数据
     */
    @TableField(exist = false)
    private List<OrderItem> orderItemList;
}